package yl.hs.bmipfull.service.report;

import com.fasterxml.jackson.core.JsonProcessingException;
import yl.hs.bmipfull.pojo.report.*;
import yl.hs.bmipfull.service.IBaseService;
import yl.hs.bmipfull.service.production.IProductionLogService;
import yl.hs.bmipfull.viewmodels.PageQuery;
import yl.hs.bmipfull.viewmodels.PageResult;
import yl.hs.bmipfull.viewmodels.SubmitModel;

import java.util.Date;
import java.util.List;
import java.util.Map;

/*
 * IProductionDayReportService
 * @category
 * @author 谢景广
 * @date 2023-02-02
 */
public interface IProductionDayReportService extends IBaseService {
    Integer generateReport(Date day,String unit,String cateSN);

    PageResult<ProductionDayReportEntity> queryList(PageQuery pageQuery, int rowNum, int page);

    List<ProductionDayReportTaskEntity> queryReportTasks(String sn);

    List<Map<String,Object>> queryReportMaterialsCombination(String sn);

    List<ProductionDayReportOrderEntity> queryReportOrders(String sn, String taskSN);

    Integer addMaterialInfo(SubmitModel model) throws Exception;

    Integer saveReportInfo(SubmitModel model) throws Exception;

    List<ProductionDayReportMaterialEntity> queryReportMaterialsList(String sn);

    List<ProductionDayReportLineOutputEntity> queryReportLines(String sn);
    void autoGenerateReport();
    void autoGenerateReport(Date time);

    /**
     * 各标号生产成本明细表
     * @param time
     * @param unit
     * @return
     */
    Map<String,Object> productCostByDay(Date time,String unit);
}
